package com.siyuan1.siyuan;

import com.siyuan1.spring.SiyuanApplicationContext;
import org.junit.Test;

/**
 * @className: Demo
 * @Description: TODO
 * @author: wzq
 * @date: 2022/8/24 10:34
 */
public class Demo {


	/**
	 * 切面逻辑
	 */
	@Test
	public void test3(){
		SiyuanApplicationContext context = new SiyuanApplicationContext(ApplicationContextConfig.class);
		OrderInterface orderService = (OrderInterface) context.getBean("orderService");
		orderService.test();
	}


	/**
	 * beanPostProcessor
	 */
	@Test
	public void test2(){
		SiyuanApplicationContext context = new SiyuanApplicationContext(ApplicationContextConfig.class);
		UserService userService = (UserService) context.getBean("useraService");
		userService.test();
	}

	@Test
	public void test1(){
		SiyuanApplicationContext context = new SiyuanApplicationContext(ApplicationContextConfig.class);

		System.out.println(context.getBean("userService"));
		System.out.println(context.getBean("userService"));
		System.out.println(context.getBean("userService"));
		System.out.println(context.getBean("userService"));

	}

}
